package com.example.idachuappone.index.welcomentity;

import org.json.JSONObject;

public class Weixin {
    private int price;
    private String text;

    public Weixin parseJson(JSONObject json) {
        if (json == null) {
            return null;
        }
        if (json.has("text")) {
            this.text = json.optString("text");
        }
        if (!json.has("price")) {
            return this;
        }
        this.price = json.optInt("price");
        return this;
    }

    public String getText() {
        return this.text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public int getPrice() {
        return this.price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
